The present invention relates to clock recovery circuits, in particular circuits for recovering a clock from serial digital data.
Serial data is sent on a number of transmission mediums without a separate clock signal for clocking the data and determining when one period ends and the next begins. This requires that the receiver circuitry be able to recover the clock from the data itself. Examples of clock recovery circuits can be found in U.S. Pat. Nos. 6,035,409; 6,100,765; and 6,101,230.
One of the issues involved in clock recovery is maintaining the clock phase aligned with incoming data. This can be particularly problematic where there are stretches of data without a transition in the data for the clock recovery circuit to key on. It would be desirable to provide a clock recovery circuit which provides the above functions, can be implemented without much circuitry, and can be implemented in digital circuitry.
The present invention provides a clock recovery circuit which has a transition detector connected to the incoming data stream. An output of the transition detector is connected to a gate, such as a D flip-flop, which has an input receiving the recovered clock. A zero or one output will be generated depending upon whether the transition is before or after the rising edge of the recovered clock. An accumulator circuit accumulates a count for each transition, providing the results to a comparison circuit. The comparison circuit compares the accumulated count to maximum and minimum thresholds, and provides advance or retard outputs when those thresholds are exceeded. A phase circuit adjusts the phase of the recovered clock by advancing or retarding it after a sufficient number of transitions have been detected either in advance or behind the recovered clock to justify such an adjustment.
The invention can be implemented in simple digital circuitry, and can use an accumulator circuit which need only store six or fewer bits. With four bits, a value of +/xe2x88x927 can be stored, which is sufficient for most purposes.
In one embodiment the accumulator is clocked by the transition as well, insuring that only transitions accumulate in the accumulator. The flip-flop output is preferably connected to the select input of a multiplexer, with the inputs being either positive or negative 1. Thus, either a positive or negative 1 will be provided to the accumulator, to accumulate up or down upon that corresponding transition. Advance and retard outputs of the comparison circuit are connected through an OR gate back to a reset input of the accumulator.
The present invention provides a clock recovery circuit that works in periods of no data. It also provides a circuit that is simple, can be implemented with digital circuitry, and does not require much chip space, and only uses a small accumulator.
For a further understanding of the nature and advantages of the invention, reference should be made to the following description taken in conjunction with the accompanying drawings.